package com.aia.ilp.web.json;

import org.apache.log4j.Logger;

import com.aia.ann.domain.Insu;
import com.aia.ann.service.ChiefService;
import com.cfh.util.Tools;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class CustomerSmsJson extends ActionSupport implements ModelDriven {
	private static final Logger logger = Logger.getLogger(CustomerSmsJson.class);

	private static final long serialVersionUID = 1L;
	private ChiefService chiefService;
	private Insu insu = new Insu();
	public String execute() throws Exception {
		
		try {
			if (logger.isDebugEnabled()) {
				logger.debug("CustomerSmsJson - start"); //$NON-NLS-1$
			}
			
			chiefService.updateCustSendSMS(this);
			
			if (logger.isDebugEnabled()) {
				logger.debug("CustomerSmsJson - end"); //$NON-NLS-1$
			}
			
			return Tools.smartReturn((ActionSupport) this);
		} catch (Exception e) {
			logger.error("Unknown Error:" + e, e);
			throw new RuntimeException(e);
		}
	}
	public Object getModel() {
		return insu;
	}

	public void setChiefService(ChiefService chiefService) {
		this.chiefService = chiefService;
	}

	public ChiefService getChiefService() {
		return chiefService;
	}

	public void setInsu(Insu insu) {
		this.insu = insu;
	}

	public Insu getInsu() {
		return insu;
	}
}
